#!/bin/bash
clear
echo 'Updating your LIVE Liriope site from you test site...'
echo '-----------------------------------------------------'
echo
echo You can first sync with a DRY RUN [recommended]
echo Would you like to do this? [Yn]

read -sn 1 dryrun

echo
echo 'Please enter your ssh password when prompted:'

if [ "$dryrun" = "n" ] || [ "$dryrun" = "N" ]; then
echo THIS IS THE REAL THING
rsync --delete --exclude /cache/ --exclude /index/ --exclude /index.php --exclude /*.sh -avze 'ssh -p 1291' ./ tygorden@tygorden.com:public_html/liriope
else
echo this is a dry run
rsync --delete --exclude /cache/ --exclude /index/ --exclude /index.php --exclude /*.sh -avzne 'ssh -p 1291' ./ tygorden@tygorden.com:public_html/liriope
fi

echo
echo "    _    _ _   ____                   _ "
echo "   / \  | | | |  _ \  ___  _ __   ___| |"
echo "  / _ \ | | | | | | |/ _ \| '_ \ / _ \ |"
echo " / ___ \| | | | |_| | (_) | | | |  __/_|"
echo "/_/   \_\_|_| |____/ \___/|_| |_|\___(_)"
echo Back to you...
echo
